The unit was investigating the sale of both drugs in the area of Chadwick Street and Mary Street when a man identified as Yeahia Ahmed got out of a gray Lexus, Sheriff Richard H. Berdnik said.
Ahmed, 32, of Woodland Park then gave an unidentified man what apparently were drugs in exchange for money, the sheriff said.
The second man then got into another car and sped off, he said.
Ahmed, after getting back into his car, drove to Spring Street, where he got into a parked Honda Accord before returning to his Lexus with a package, Berdnik said.
Detectives stopped Ahmed soon after and found "a clear knotted bag containing approximately 50 grams of raw cocaine, glass tubes containing marijuana and $189," he said.
They also searched the Accord and found the hidden compartment containing the Ecstasy and cocaine -- worth a combined $24,000 on the street, the sheriff said.
A search of Ahmed's home turned up $2,000 in cash that he admitted were drug proceeds, Berdnik added. It was seized for forfeiture.
Ahmed remained held Friday in the Passaic County Jail on drug charges.
Click here to follow Daily Voice Bergenfield and receive free news updates.